var app = require("express")();
var server = require("http").Server(app);
var io = require("socket.io")(server);

server.listen(3000, () => {
  console.log("服务器启动✅");
});

app.get("/", (req, res) => {
  res.sendFile(__dirname + "/index.html");
});

io.on("connection", (socket) => {
  socket.on("hehe", (data) => console.log(data));
});
